﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace G.Service.API.Request
{
    public abstract class BaseRequest<T> : G.SL.Net.APISuite.Request<T> where T : G.SL.Net.APISuite.IResponse
    {
        public string Action { get; set; }
        public BaseRequest(string action)
        {
            this.Action = action;
            this.RequestMethod = HttpMethod.Get;
        }

        public override System.Collections.Generic.IDictionary<string, string> GetParameters()
        {
            Dictionary<string, string> dic = new Dictionary<string, string>();
            dic.Add("action", Action);
            dic.Add("t", DateTime.Now.GetTimestamp().ToString());
            GetParameters(dic);
            return dic;
        }

        public abstract void GetParameters(Dictionary<string, string> dic);
    }
}
